package com.hxxy.wyp.petsLover.common.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Message {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String name;
    @NotBlank
    @NotNull(message = "留言内容不能为空！")
    private String content;
    private LocalDateTime messageTime;
    @NotNull(message = "留言类型不能为空！")
    private String messageType;
    private String messageInfo;
    private String status;

    private Long userId;

    @TableField(exist = false)
    private MessageReply messageReply;

}
